package com.feifan.oa.service.impl;

import com.feifan.common.core.text.Convert;
import com.feifan.oa.domain.HolidayDate;
import com.feifan.oa.mapper.HolidayDateMapper;
import com.feifan.oa.service.IHolidayDateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 假期时间Service业务层处理
 * 
 * @author 非凡
 * @date 2020-07-01
 */
@Service
public class HolidayDateServiceImpl implements IHolidayDateService 
{
    @Autowired
    private HolidayDateMapper holidayDateMapper;

    /**
     * 查询假期时间
     * 
     * @param id 假期时间ID
     * @return 假期时间
     */
    @Override
    public HolidayDate selectHolidayDateById(Long id)
    {
        return holidayDateMapper.selectHolidayDateById(id);
    }


    /**
     * 查询假期时间列表
     * 
     * @param holidayDate 假期时间
     * @return 假期时间
     */
    @Override
    public List<HolidayDate> selectHolidayDateList(HolidayDate holidayDate)
    {
        return holidayDateMapper.selectHolidayDateList(holidayDate);
    }

    /**
     * 新增假期时间
     * 
     * @param holidayDate 假期时间
     * @return 结果
     */
    @Override
    public int insertHolidayDate(HolidayDate holidayDate)
    {
        return holidayDateMapper.insertHolidayDate(holidayDate);
    }

    /**
     * 修改假期时间
     * 
     * @param holidayDate 假期时间
     * @return 结果
     */
    @Override
    public int updateHolidayDate(HolidayDate holidayDate)
    {
        return holidayDateMapper.updateHolidayDate(holidayDate);
    }

    /**
     * 删除假期时间对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteHolidayDateByIds(String ids)
    {
        return holidayDateMapper.deleteHolidayDateByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除假期时间信息
     * 
     * @param id 假期时间ID
     * @return 结果
     */
    @Override
    public int deleteHolidayDateById(Long id)
    {
        return holidayDateMapper.deleteHolidayDateById(id);
    }

    @Override
    public HolidayDate selectHolidayDateByHId(Long id) {
        return holidayDateMapper.selectHolidayDateByHId(id);
    }
}
